package com.ledi.guns.common.persistence.dao;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ledi.guns.common.persistence.model.User;
import com.ledi.guns.common.persistence.model.vo.AgentUserVo;
import com.ledi.guns.common.persistence.model.vo.UserVo;

/**
 * <p>
 * 管理员表 Mapper 接口
 * </p>
 *
 * @author ledi
 * @since 2017-07-11
 */
public interface UserMapper extends BaseMapper<User> {

	Long getRoleId(String name);

	List<UserVo> findSchoolUserList(Page<UserVo> page, Map<String, Object> search);

	int findSchoolUserCount(Map<String, Object> search);

	UserVo getSchoolUser(Integer id);

	/**
	 * 获取代理商员工列表
	 * 
	 * @param page
	 * @param search
	 * @return
	 */
	List<AgentUserVo> searchAgentUserList(Page<AgentUserVo> page, Map<String, Object> search);

	/**
	 * 获取代理商员工列表数目
	 *
	 * @param search
	 * @return
	 */
	int searchAgentUserCount(Map<String, Object> search);
}
